<?php
require_once ('../../includes/global.php');

//$_GET['did']=35;

$_GET['did']==''&&Jt($_SERVER['HTTP_REFERER'],"错误的请求参数",1);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../css/mod.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery.js"></script>
<script language="javascript">
<!--
var show_time_up;  //闪动时间
var show_time_up_2;  //闪动时间
var show_time_down;  //闪动时间
var show_time_down_2;  //闪动时间
/**
 *向上移动
 */
function move_up(o){

    clearInterval(show_time_up);    //结束闪动
    clearTimeout(show_time_up_2);    //结束闪动

    var current_ele =   jQuery(o).parent().parent().parent();
    var pre_ele     =   current_ele.prev();
    //var current_color=  current_ele.css('background-color');    //原来的颜色
    var current_color=  '#D1DEF1';    //原来的颜色
    var show_color  =   '#0285C1';    //闪动的颜色
    var act_color   =   show_color; //当前闪动的颜色
    
    if(pre_ele.find(":contains('屏蔽')").html()==null){
        alert('已经是最顶,不能再上啦!');
        return ;
    }

    //换位
    current_ele.css({'background-color':current_color,'color':'#000'}).after(pre_ele);

    //闪动
    show_time_up = setInterval(function(){
        current_ele.css({'background-color':act_color,'color':'#000'});
        if(act_color==show_color){
            act_color=current_color;
        }else{
            act_color=show_color;
        }
    }, 500);

    //结束闪动
    show_time_up_2 = setTimeout(function(){
        clearInterval(show_time_up);
    },3000);

}

/**
 *向下移动
 */
function move_down(o){

    clearInterval(show_time_down);    //结束闪动
    clearTimeout(show_time_down_2);    //结束闪动
    
    var current_ele =   jQuery(o).parent().parent().parent();
    var next_ele     =   current_ele.next();
    //var current_color=  current_ele.css('background-color');    //原来的颜色
    var current_color=  '#D1DEF1';    //原来的颜色
    var show_color  =   '#0285C1';    //闪动的颜色
    var act_color   =   show_color; //当前闪动的颜色

    if(next_ele.find(":contains('屏蔽')").html()==null){
        alert('已经是最底,不能再下啦!');
        return ;
    }

    //换位
    next_ele.after(current_ele);
    current_ele.css({'background-color':current_color,'color':'#000'});

    //闪动
    show_time_down = setInterval(function(){
        current_ele.css({'background-color':act_color,'color':'#000'});
        if(act_color==show_color){
            act_color=current_color;
        }else{
            act_color=show_color;
        }
    }, 500);

    //结束闪动
    show_time_down_2 = setTimeout(function(){
        clearInterval(show_time_down);
    },3000);

}

/**
 * 拖动
 */
var current_ele;
function move(o,event){
	clearInterval(show_time_down);    //结束闪动
    clearTimeout(show_time_down_2);    //结束闪动

    var price_box_res=jQuery('#price_box');
    
     current_ele =   jQuery(o).parent().parent().parent();	//当前元素
     jQuery('body').append(current_ele);
     

	var E = event || window.enent;
    if(E.setCapture){
        E.setCapture();
        E.returnValue=false;
    }else if(window.captureEvents){ 
        E.preventDefault();
        window.captureEvents(E.MOUSEMOVE|E.MOUSEUP);  
    }

    //定位
    var X=event.pageY;
    var Y=event.pageX;
    document.onmousemove=function(e){
        X=e.pageX+10;
        Y=e.pageY;
        current_ele.css({
        	'left':X,
        	'top':Y
        });
    };
    document.onmouseup = function(){
    	var drag_location = jQuery('#drag_location_id');	//要放的位置 
    	drag_location.after(current_ele).hide();
    	current_ele.css({
            'position':'',
            'filter':'alpha(opacity=100)',
        	'-moz-opacity':'1',
        	'opacity': '1'
        });
        document.onmousemove=function(){};
        document.onmouseup=function(){    };
        jQuery('.move_').unbind('mouseover');
    };

    //要放的位置
    jQuery('.move_').bind('mouseover',function(){
    	var drag_location = jQuery('#drag_location_id');	//要放的位置 
    	drag_location.css('display','');
    	jQuery(this).after(drag_location);
    });


    document.onselectstart=function(){return false;}
    current_ele.appendTo('#modify_table');
    current_ele.css({
        'position':'absolute',
        'filter':'alpha(opacity=50)',
    	'-moz-opacity':'0.5',
    	'opacity': '0.5',
    	'top':event.pageY,
    	'left':event.pageX+10
    });
	
}

/**
 * 删除js
 */
jQuery(function(){
	var structure_del_in_time;
	var structure_del_out_time;
	jQuery('.structure_del_pre')
		.mouseover(function(){
			clearTimeout(structure_del_out_time);
			var structure_obj=jQuery(this).next();
			structure_del_time = setTimeout(function(){
				structure_obj.fadeIn();
			},300);
		})
		.mouseout(function(){
			var structure_obj=jQuery(this).next();
			clearTimeout(structure_del_time);
			structure_del_out_time = setTimeout(function(){
    			structure_obj.fadeOut();
			},2000);
		});

	jQuery('.structure_del')
		.mouseover(function(){
			clearTimeout(structure_del_out_time);
		})
		.mouseout(function(){
			var structure_obj=jQuery(this);
			structure_del_out_time = setTimeout(function(){
    			structure_obj.fadeOut();
			},2000);
		})
		.bind('click',function(){
			structure_del(jQuery(this)[0]);
		});
});

/**
 * 删除js函数
 */
function structure_del(structure_del_html_obj){
	if (confirm("确定删除吗？")){
		var structure_obj = jQuery(structure_del_html_obj).parent().parent();
    	structure_obj.fadeOut(1000,function(){
    		jQuery(this).remove();
    	})
	}
}

 
var $ = function (id){
    return typeof id=="string" ? document.getElementById(id):id;
}

    var setdata=function (obj){
        var value=obj.value;
        var num=obj.name.match(/\[([a-z0-9A-Z_\-]+)\]/)[1]
        //		alert(num);
        var type={
            text:function (){
                return  '样式: <input type="text" name="structure['+num+'][css]" style="width:100px;" />&nbsp;&nbsp;js: <input type="text" name="structure['+num+'][js]" style="width:100px;" />&nbsp;&nbsp;fparam: <input type="text" name="structure['+num+'][fparam]" style="width:100px;" />&nbsp;&nbsp;<label for="idstructure['+num+'][fxian]">验证</label> <input type="checkbox" name="structure['+num+'][fxian]" id="idstructure['+num+'][fxian]" />';
            }(num),
            radio:function (){
                return '值对: <input type="text" name="structure['+num+'][method][jsonvalue]" style="width:100px;" />默认: <input type="text" name="structure['+num+'][method][dvalue]" style="width:50px;" />';
            }(num),
            checkbox:function (){
                return '值对: <input type="text" name="structure['+num+'][method][jsonvalue]" style="width:100px;" />默认: <input type="text" name="structure['+num+'][method][dvalue]" style="width:50px;" />';
            }(),
            select:function (){
                return '值对: <input type="text" name="structure['+num+'][method][jsonvalue]" style="width:100px;" />默认: <input type="text" name="structure['+num+'][method][dvalue]" style="width:50px;" />';
            }(),
            hide:function (){
                return '隐藏域';
            }(),
            my97:function (){
                return 'My97时间日期插件'+
                    '| 您可以选择显示时间格式[<span style="color:red;">不可用中文</span>]'+
                    '<input name="structure['+num+'][format]" type="text" value="yyyy-M-d H:mm:ss" style="width:150px;"/>'+
                    '| php格式化'+
                    '<input name="structure['+num+'][phpformat]" type="text" value="Y-m-d H:i:s" style="width:150px;"/>'+
                    '<input type="hidden" name="structure['+num+'][plug]" value="d2t"/>';
            }(),
            md5str:function (){
                return '密码  验证:<input type="checkbox" name="structure['+num+'][yan]" value="1" />';
            }(),
            dselect:function (){
                return '表名：<input type="text" name="structure['+num+'][method][table]" style="width:100px;" />&nbsp;&nbsp;条件： <input type="text" name="structure['+num+'][method][condition]" style="width:100px;" />&nbsp;&nbsp;value: <input type="text" name="structure['+num+'][method][yvalue]" style="width:30px;" />&nbsp;&nbsp;text： <input type="text" name="structure['+num+'][method][xvalue]" style="width:30px;" />&nbsp;&nbsp;默认值： <input type="text" name="structure['+num+'][method][ydefault]"  style="width:30px;" />&nbsp;&nbsp;默认文字： <input type="text" name="structure['+num+'][method][xdefault]"  style="width:30px;" />';
            }(num),
            dcheckbox:function (){
                return '表名：<input type="text" name="structure['+num+'][method][table]" style="width:100px;" />&nbsp;&nbsp;条件： <input type="text" name="structure['+num+'][method][condition]" style="width:100px;" />&nbsp;&nbsp;value: <input type="text" name="structure['+num+'][method][yvalue]" style="width:30px;" />&nbsp;&nbsp;text： <input type="text" name="structure['+num+'][method][xvalue]" style="width:30px;" />&nbsp;&nbsp;默认值： <input type="text" name="structure['+num+'][method][ydefault]"  style="width:30px;" />&nbsp;&nbsp;';
            }(num),
            ubb:function (){
                return '默认ubb选项';
            }(num),
            bind:function (){
                return '&nbsp;&nbsp;模块id<input type="text" name="structure['+num+'][did]" style="width:100px;" />'+
                    '&nbsp;&nbsp;<b>过滤设置</b><span style="color:#bcbcbc;" title="此功能可以单独指定此附属功能只绑定一条数据!">说明</span>'+
                    '&nbsp;&nbsp;<label><input name="structure['+num+'][filter][open]" type="checkbox" onclick="if(this.checked){document.getElementById(\'structure['+num+'][filter][spanId]\').style.display=\'\';}else{document.getElementById(\'structure['+num+'][filter][spanId]\').style.display=\'none\';}" value="1"/></label>'+
                    '<span id="structure['+num+'][filter][spanId]" style="display:none;">&nbsp;&nbsp;指定数据字段<input type="text" name="structure['+num+'][filter][field]" style="width:30px;" value="gid" />'+
                    '&nbsp;&nbsp;<span title="多条数据用#连接">指定字段数据</span><input type="text" name="structure['+num+'][filter][data]" style="width:230px;" value="" />'+
                    '</span>';
            }(num),
            textarea:function (){
                return 'fparam: <input type="text" name="structure['+num+'][fparam]" style="width:100px;" />';
            }(num),
            fileupBic:function (){
                return '<label for="idstructure['+num+'][format][img]">图像</label><input type="checkbox" name="structure['+num+'][format][img]" id="idstructure['+num+'][format][img]" /><label for="idstructure['+num+'][format][sound]">,声音</label><input type="checkbox" name="structure['+num+'][format][sound]" id="idstructure['+num+'][format][sound]" /><label for="idstructure['+num+'][format][other]">,其它:</label><input type="text" name="structure['+num+'][format][other]" id="idstructure['+num+'][format][other]" style="width:100px;"  />路径 :<input type="text" name="structure['+num+'][path]" style="width:100px;"  />大小: <input type="text" name="structure['+num+'][filesize]" style="width:30px;" />';
            }(num),
            fileupFs:function (){
                return '<label for="idstructure['+num+'][format][img]">图像</label><input type="checkbox" name="structure['+num+'][format][img]" id="idstructure['+num+'][format][img]" /><label for="idstructure['+num+'][format][sound]">,声音</label><input type="checkbox" name="structure['+num+'][format][sound]" id="idstructure['+num+'][format][sound]" /><label for="idstructure['+num+'][format][other]">,其它:</label><input type="text" name="structure['+num+'][format][other]" id="idstructure['+num+'][format][other]" style="width:100px;"  />路径 :<input type="text" name="structure['+num+'][path]" style="width:100px;"  />大小: <input type="text" name="structure['+num+'][filesize]" style="width:30px;" />';
            }(num),
            XUploadFiles:function (){
                return '<label for="idstructure['+num+'][format][AllowExt]">允许上传类型</label><input type="text" name="structure['+num+'][format][AllowExt]" id="idstructure['+num+'][format][AllowExt]" /><label for="idstructure['+num+'][format][DenyExt]">,不允许上传类型</label><input type="text" name="structure['+num+'][format][DenyExt]" id="idstructure['+num+'][format][DenyExt]" value="asp;jsp;php"/><label for="idstructure['+num+'][MaxFileCount]">,文件上传数:</label><input type="text" name="structure['+num+'][MaxFileCount]" id="idstructure['+num+'][MaxFileCount]" style="width:10px;" value="1" />路径 :<input type="text" name="structure['+num+'][path]" style="width:130px;"  />总大小: <input type="text" name="structure['+num+'][MaxTotalSize]" value="10240000"  style="width:60px;" />';
            }(num),
            recommend:function (){
                return '<div style="float:left;">推荐旗色: </div>'+
                    '<label><div style="float:left;width:30px;height:12px;background:green;"></div><input type="radio" checked name="structure['+num+'][flag]" value="green" style="float:left;"/></label>'+
                    '<label><div style="float:left;width:30px;height:12px;background:red;"></div><input type="radio" name="structure['+num+'][flag]" value="red" style="float:left;"/></label>'+
                    '<label><div style="float:left;width:30px;height:12px;background:blue;"></div><input type="radio" name="structure['+num+'][flag]" value="blue"  style="float:left;"/></label>'+
                    '<label><div style="float:left;width:30px;height:12px;background:orange;"></div><input type="radio" name="structure['+num+'][flag]" value="orange"  style="float:left;"/></label>'+
                    '<div style="float:left;margin-left:20px;">'+
                    '<label>是否排序:<input name="structure['+num+'][order][open]" type="checkbox" value="1" onclick="if(this.checked){document.getElementById(\'structure'+num+'orderopen\').style.display=\'\';}else{document.getElementById(\'structure'+num+'orderopen\').style.display=\'none\';}"/></label>'+
                    '<span id="structure'+num+'orderopen" style="display:none;">'+
                    '<span style="padding:0 5px;">显示字段:<input name="structure['+num+'][order][field]" type="text" value="" style="width:60px;text-align:center;"/></span>'+
                    '<span style="padding:0 5px;"><select name="structure['+num+'][order][order]"><option value="asc">升ASC</option><option value="desc">降DESC</option></select></span>'+
                    '<span style="padding:0 5px;">'+
                    '<label for="structure['+num+'][order][full_table_order]" title="全表数据排序[主要是针对附属里的排序有作用]">全表</label>'+
                    '<input id="structure['+num+'][order][full_table_order]" name="structure['+num+'][order][full_table_order]" type="checkbox" value="1"/>'+
                    '</span>'+
                    '</span>'+
                    '</div>';
            }(num)
        }
        return type[value];
    }



function addBind(){

	var bindField=prompt("绑定的字段是?");

	if(!bindField||bindField=="undefined"){return false;}

	var tableObj=document.getElementById("dcfgTable");

	nowTr=tableObj.insertRow(-1);

	nowTd=nowTr.insertCell(-1);

	nowTd.style.textAlign="right";

	nowTd.style.paddingRight="2px";

	nowTd.innerHTML='<div class="structure_del_pre" style="float:right;">'+bindField+'&nbsp;&nbsp;</div>'+
		'<div class="structure_del" style="float:left;margin-left: 10px;" onclick="structure_del(this);">'+
		'<a onmouseover="this.style.color=\'red\';" onmouseout="this.style.color=\'green\';" style="cursor: pointer;font-weight:bold;color:green;" title="只删除此处的元素，和数据库无关">删除</a>'+
		'</div>';

	nowTd2=nowTr.insertCell(-1);



/*	<td width="92%" height="30" align="left" class="con" style="padding-top:12px;"> */



	nowTd2.style.textAlign="left";

	nowTd2.className="con";

	nowTd2.style.paddingTop="12px";

	nowTd2.innerHTML='名称:<input type="text" name="structure['+bindField+'][COMMENT]" style="width:80px;" />&nbsp;&nbsp;类型：<select name="structure['+bindField+'][ftype]" style="width:60px;" onChange="$(\'spandivid\'+this.name.match(/\[([a-z0-9A-Z]+)\]/)[1]).innerHTML=setdata(this);"><option value=""></option><option value="text">文本</option><option value="hide">隐藏域</option><option value="select">静态下拉</option><option value="dselect">动态下拉</option><option value="radio">单选</option><option value="checkbox">复选</option><option value="ubb">UBB</option><option value="textarea">textarea</option><option value="fileupBic">文件上传</option><option value="recommend">推荐属性</option><option value="bind">绑定</option></select><label for="idstructure['+bindField+'][search]">搜索</label><input type="checkbox" name="structure['+bindField+'][search]" id="idstructure['+bindField+'][search]" /><label for="idstructure['+bindField+'][show]">,&nbsp;显示</label><input type="checkbox" name="structure['+bindField+'][show]" id="idstructure['+bindField+'][show]" /><div style="padding:5px;padding-left:20px;padding-bottom:10px;" id="spandivid'+bindField+'"></div>';

//	alert(nowTd2.innerHTML);

	jQuery(window).scrollTop(jQuery(window).height());
	jQuery('input[name="structure['+bindField+'][COMMENT]"]').focus();

}

//-->

</script>



</head>



<body style="background: #D1DEF1;">



<?php

$data=Dga("dcfg"," id like '".$_GET['did']."'");



$dcfg=json_decode($data['dcfg'],true);



$preTable=Dz("describe lm_".$dcfg['name']);

//这里是新加的，主要用到了里面的注释
$preTable=Dz("SELECT COLUMN_NAME as Field, COLUMN_COMMENT as comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'lm_{$dcfg['name']}' AND table_schema = '{$dbname}'");

/*echo "<div align=left>";

Jc($dcfg);

Jc($preTable);exit;

echo "</div>";*/

foreach ($preTable as $k=>&$v){

	if(!$dcfg['structure'][$v['Field']]){

		$dcfg['structure'][$v['Field']]=array('ftype'=>'','COMMENT'=>$v['comment']);

	}

}

foreach($dcfg['structure'] as $km=>$vm){

	if (in_array($km,array("lg","gid","del","addtime","sortid"/*,"bdid"*/,"bdb","web"))) {

		unset($dcfg['structure'][$km]);

	}

}



//Jc($dcfg);

?>





<form method="post" enctype="multipart/form-data" action="dataset.php">



<fieldset><legend>基表信息</legend>

<?php



echo "<br/><div style='float:left;'><a href='l.php?did=2&from=b&mid={$_GET['mid']}&{$_GET[pagename]}={$_GET[$_GET[pagename]]}&lg={$_GET['lg']}' title='列表【LIST】'><img src='../img/table.gif' border='0' ait='列表【LIST】'></a>    <a href='#' onclick=\"location.reload();\" title='刷新【REFRESH】'><img src='../img/page_refresh.gif' border='0' ait='刷新【REFRESH】'></a>  <a href='javascript:history.go(-1)'  title='后退【BACK】'><img src='../img/arrow_rotate_anticlockwise.png' border='0' ait='后退【BACK】'></a></div><br/>";

?>

<table id="modify_table" width="100%" border="1" align="center" cellpadding="0"

	cellspacing="0" bordercolor="#B1CDE6" style="border-collapse: collapse">

	<tr>

		<td height="30" width="8%" align="right" class="title">名称：</td>

		<td width="92%" height="30" align="left" class="con"><input

			type="text" name="title" value="<?php echo $data['title'];?>" /></td>

	</tr>



	<tr>

		<td height="30" width="8%" align="right" class="title">表名：</td>

		<td width="92%" height="30" align="left" class="con"><span

			style="color: red;"><?php echo $dcfg['name'];?></span></td>

	</tr>



	<tr>

		<td height="30" width="8%" align="right" class="title">站点：</td>

		<td width="92%" height="30" align="left" class="con"><span

			style="color: red;"><?php echo $data['web'];?></span></td>

	</tr>



	<tr>

		<td height="30" width="8%" align="right" class="title">语言：</td>

		<td width="92%" height="30" align="left" class="con"><span

			style="color: red;"><?php echo $data['lg'];?></span></td>

	</tr>



	<tr>

		<td height="30" width="8%" align="right" class="title"> 权限：</td>

		<td width="92%" height="30" align="left" class="con">

			<label style="padding:0 10px;">屏蔽添加：<span style="color:red;"><input name="add" <?php if($dcfg['add']) echo 'checked'; ?> type="checkbox" value="1"/></span></label>

			<label style="padding:0 10px;">屏蔽父级添加：<span style="color:red;"><input name="parent_add" <?php if($dcfg['parent_add']) echo 'checked'; ?> type="checkbox" value="1"/></span></label>

			<label style="padding:0 10px;">屏蔽查看：<span style="color:red;"><input name="view" <?php if($dcfg['view']) echo 'checked'; ?> type="checkbox" value="1"/></span></label>

			<label style="padding:0 10px;">屏蔽父级查看：<span style="color:red;"><input name="parent_view" <?php if($dcfg['parent_view']) echo 'checked'; ?> type="checkbox" value="1"/></span></label>

			<label style="padding:0 10px;">屏蔽修改：<span style="color:red;"><input name="change" <?php if($dcfg['change']) echo 'checked'; ?> type="checkbox" value="1"/></span></label>

			<label style="padding:0 10px;">屏蔽删除：<span style="color:red;"><input name="del" <?php if($dcfg['del']) echo 'checked'; ?> type="checkbox" value="1"/></span></label>

		</td>

	</tr>



	<tr>

		<td height="30" width="8%" align="right" class="title">条件：</td>

		<td width="92%" height="30" align="left" class="con">

			<input	type="text" name="cmsCon" value="<?php echo $dcfg['cmsCon'];?>"  style="width:670px;"/>

		</td>

	</tr>

	<tr>

		<td height="30" width="8%" align="right" class="title">信息预览：</td>

		<td width="92%" height="30" align="left" class="con">
            <span style="color: red;">
                <label for="visit">开启:</label><input id="visit" name="visit[switch]" <?php if($dcfg['visit']['switch']) echo 'checked'; ?> type="checkbox" value="true" />
                <input	type="text" name="visit[link]" value="<?php echo $dcfg['visit']['link'];?>"  style="width:620px;"/>
            </span>
        </td>

	</tr>



	<tr>

		<td height="30" width="8%" align="right" class="title">debug：</td>

		<td width="92%" height="30" align="left" class="con"><span

			style="color: red;"><input name="debug"

			<?php if($dcfg['debug']) echo 'checked'; ?> type="checkbox"

			value="true" /></span></td>

	</tr>



</table>

<!--基本信息 --> <input type="hidden" name="id"

	value="<?php echo $data['id'];?>" /> <input type="hidden" name="web"

	value="<?php echo $data['web'];?>" /> <input type="hidden" name="name"

	value="<?php echo $dcfg['name'];?>" /> <input type="hidden" name="base"

	value="1" /> <input type="hidden" name="rcfg" value="Z" /> <input

	type="hidden" name="pageline" value="10" /> <!--<input type="hidden"

	name="self" value="true" />--> <!--基本信息end --></fieldset>

<fieldset><legend>数据配置</legend>



<table id="dcfgTable" width="100%" border="1" align="center"

	cellpadding="0" cellspacing="0" bordercolor="#B1CDE6"

	style="border-collapse: collapse">



	<tr>

		<td height="30" width="8%" align="right" class="modtitle">模块名称：</td>

		<td width="92%" height="30" align="left" class="con"><input

			type="text" name="modtitle" value="<?php echo $dcfg['title']?>" />&nbsp;&nbsp;&nbsp;&nbsp;

		<input type="button" onclick="addBind();" value="添加绑定信息" /></td>

	</tr>



<?php


foreach($dcfg['structure'] as $k=>$v){

		$k1=$k2=$k3=$k4=$k5=$k6=$k7=$k8=$k9=$k10=$k11=$k12=$k13=$k14=$k15=$k16='';

	switch($v['ftype']) {
	    case 'select':
			if($v['method']['table']){$k4="selected";}else{$k3="selected";}
	    break;
		case "text":
			$k1="selected";
		break;
		case "radio":
			$k5="selected";
		break;
		case "checkbox":
			$k6="selected";
		break;
		case "dcheckbox":
			$k16="selected";
		break;
		case "hide":
			$k2="selected";
		break;
		case "ubb":
			$k7="selected";
		break;
		case "textarea":
			$k8="selected";
		break;
		case "fileupBic":
			$k9="selected";
		break;
		case "recommend":
			$k10="selected";
		break;
		case "bind":
			$k11="selected";
		break;
		case "md5str":
			$k12="selected";
		break;
		case "my97":
			$k13="selected";
		break;
		case "fileupFs":
			$k14="selected";
		break;
		case "XUploadFiles":
			$k15="selected";
		break;
		default:
		    $v['ban']="y";
		    break;

	}

?>



<tr
		class="move_"

		onMouseover="this.style.background='#7F9FBD';this.style.color='#fff'"

		onMouseOut="this.style.background='#D1DEF1';this.style.color='#000'"
        >

		<td height="30" width="10%" align="right" class="title">
			<div class="structure_del_pre" style="float:right;"><?php echo $k;?>&nbsp;&nbsp;</div>
			<div class="structure_del" style="float:left;margin-left: 10px;display:none;">
				<a onmouseover="this.style.color='red';" onmouseout="this.style.color='green';" style="cursor: pointer;font-weight:bold;color:green;" title="只删除此处的元素，和数据库无关">删除</a>
			</div>
			<div style="clear:both;"></div>
			<label for="structure[<?php echo $k;?>][ban]" title="此功能是为了单表多模块复用!屏蔽此字段后,[列表][添加][查看][修改]中都无法看到此字段">
				屏蔽此字段:
				<input id="structure[<?php echo $k;?>][ban]" name="structure[<?php echo $k;?>][ban]" <?php echo ($v['ban']!='')?'checked':'';?> type="checkbox" value="1" onclick="document.getElementById('tdspanid<?php echo $k;?>').style.display=this.checked?'none':'';"/>
			</label>
            <div style="margin-top:5px;">
                <a onclick="move_up(this);" onmouseover="this.style.color='#fff';" onmouseout="this.style.color='green';" style="cursor: pointer;font-weight:bold;color:green;" title="移动后记得保存">上移</a>
                <a onclick="move_down(this);" onmouseover="this.style.color='#fff';" onmouseout="this.style.color='green';" style="cursor: pointer;font-weight:bold;color:green;" title="移动后记得保存">下移</a>
                <a onmousedown="move(this,event);" onmouseover="this.style.color='#fff';" onmouseout="this.style.color='green';" style="cursor: pointer;font-weight:bold;color:green;" title="移动后记得保存">移动</a>
                
            </div>
		</td>

		<td width="92%" height="30" align="left" class="con"

			style="padding-top: 12px;">
		<span id="tdspanid<?php echo $k;?>" style="display:<?php echo ($v['ban']!='')?'none':'';?>;">
			名称:<input type="text"

			name="structure[<?php echo $k;?>][COMMENT]" style="width: 80px;"

			value="<?php echo $v['COMMENT'];?>" /> &nbsp;&nbsp; 类型：<select

			name="structure[<?php echo $k;?>][ftype]" style="width: 83px;"

			onChange="$('spandivid'+this.name.match(/\[([a-z0-9A-Z_]+)\]/)[1]).innerHTML=setdata(this);">

			<option value=""></option>

			<option value="text" <?php echo $k1;?>>文本</option>

			<option value="md5str" <?php echo $k12;?>>密码</option>

			<option value="hide" <?php echo $k2;?>>隐藏域</option>

			<option value="select" <?php echo $k3;?>>静态下拉</option>

			<option value="dselect" <?php echo $k4;?>>动态下拉</option>

			<option value="radio" <?php echo $k5;?>>单选</option>

			<option value="checkbox" <?php echo $k6;?>>复选</option>
            
			<option value="dcheckbox" <?php echo $k16;?>>动态复选</option>

			<option value="ubb" <?php echo $k7;?>>UBB</option>

			<option value="textarea" <?php echo $k8;?>>textarea</option>

			<option value="fileupBic" <?php echo $k9;?>>文件上传</option>
            
			<option value="fileupFs" <?php echo $k14;?>>Flash上传</option>
            
			<option value="XUploadFiles" <?php echo $k15;?>>大附件上传</option>

			<option value="recommend" <?php echo $k10;?>>推荐属性</option>

			<option value="bind" <?php echo $k11;?>>绑定</option>

			<option value="my97" <?php echo $k13;?>>My97</option>

		</select>

		<label >

			搜索

			<input type="checkbox" name="structure[<?php echo $k;?>][search]" id="idstructure[<?php echo $k;?>][search]" 	<?php if($v['search']!=''){echo "checked";}?> value="1" />

		</label>

		<label for="idstructure[<?php echo $k;?>][show]">

			,&nbsp;显示

			<input	type="checkbox" name="structure[<?php echo $k;?>][show]" id="idstructure[<?php echo $k;?>][show]" <?php if($v['show']==1){echo "checked";}?> value="1" />

		</label>

		<label for="idstructure[<?php echo $k;?>][only]">

			,&nbsp;唯一

			<input	type="checkbox" name="structure[<?php echo $k;?>][only]" id="idstructure[<?php echo $k;?>][only]" <?php if($v['only']==1){echo "checked";}?> value="1"/>

		</label>

		<label for="structure[<?php echo $k;?>][datetimeChange]">

			,&nbsp;<span title="最好只用在时间字段上,在其他字段上会可能会出现不可预料的情况!">时间格式化</span>

			<input  name="structure[<?php echo $k;?>][datetimeChange]" id="structure[<?php echo $k;?>][datetimeChange]" onclick="if(this.checked){document.getElementById('idstructure[<?php echo $k;?>][globalformat]').style.display='';}else{document.getElementById('idstructure[<?php echo $k;?>][globalformat]').style.display='none';}" type="checkbox" <?php if($v['datetimeChange']==1){echo "checked";}?> value="1"/>

		</label>

		<input name="structure[<?php echo $k;?>][globalformat]" id="idstructure[<?php echo $k;?>][globalformat]" value="<?php echo $v['globalformat']==''?'Y-m-d H:i:s':$v['globalformat'];?>" style="display:<?php if($v['datetimeChange']!=1){echo "none";}?>;"/>


		<label for="structure[<?php echo $k;?>][default_open]">

			,&nbsp;<span title="">默认值</span>

			<input  name="structure[<?php echo $k;?>][default_open]" id="structure[<?php echo $k;?>][default_open]" onclick="if(this.checked){document.getElementById('idstructure[<?php echo $k;?>][default_div]').style.display='';}else{document.getElementById('idstructure[<?php echo $k;?>][default_div]').style.display='none';}" type="checkbox" <?php if($v['default_open']==1){echo "checked";}?> value="1"/>

		</label>
		<span id="idstructure[<?php echo $k;?>][default_div]" style="display:<?php if($v['default_open']!=1){echo "none";}?>;">
			<select name="structure[<?php echo $k;?>][DEFAULTTYPE]" onchange="document.getElementById('idstructure[<?php echo $k;?>][DEFAULT]').focus();">
				<option <?php if($v['DEFAULTTYPE']=='C'){echo "selected";}?> value="C">常量</option>
				<option <?php if($v['DEFAULTTYPE']=='G'){echo "selected";}?> value="G">全局变量</option>
				<option <?php if($v['DEFAULTTYPE']=='R'){echo "selected";}?> value="R">GET变量</option>
				<option <?php if($v['DEFAULTTYPE']=='S'){echo "selected";}?> value="S">SESSION变量</option>
				<option <?php if($v['DEFAULTTYPE']=='F'){echo "selected";}?> value="F">函数</option>
				<option <?php if($v['DEFAULTTYPE']=='E'){echo "selected";}?> value="E">函数-Extend</option>
			</select>
			<input onfocus="this.select();" name="structure[<?php echo $k;?>][DEFAULT]" id="idstructure[<?php echo $k;?>][DEFAULT]" value="<?php echo $v['DEFAULT'];?>" />
		</span>



		<div style="padding: 5px; padding-left: 20px; padding-bottom: 10px;" id="spandivid<?php echo $k;?>">



<?php



switch($v['ftype']) {

    case 'text':



?>

样式:

		<input type="text" name="structure[<?php echo $k;?>][css]" 	style="width: 100px;" value="<?php echo $v['css'];?>" />&nbsp;&nbsp;js:	<input type="text" name="structure[<?php echo $k;?>][js]" style="width: 100px;" value="<?php echo preg_replace('/\"/','`',$v['js']);?>" />&nbsp;&nbsp;fparam:	<input type="text" name="structure[<?php echo $k;?>][fparam]" style="width: 100px;" value="<?php echo $v['fparam'];?>" />&nbsp;&nbsp;

		<label	for="idstructure[<?php echo $k;?>][fxian]" />验证</label>

		<input	type="checkbox" name="structure[<?php echo $k;?>][fxian]" id="idstructure[<?php echo $k;?>][fxian]"	<?php if($v['fxian']!=''){echo "checked";}?> />

<?php



    break;

	case "radio":

	case "checkbox":

		$xy=array();

		$v['jsonvalue']='';

		foreach($v['method']['yvalue'] as $i=>$j){
		    
		    if($v['jsonvalue']!=''){$v['jsonvalue'].="#";}
		    
		    $v['jsonvalue'].=$j.'-'.$v['method']['xvalue'][$j];

			//$xy[]=$j."-".$v['method']['xvalue'][$i];

		}

		/*foreach($xy as $ii=>$jj){

			if($ii!=0){$v['jsonvalue'].="#";}

			$v['jsonvalue'].=$jj;

		}*/

?>

值对: <input type="text"

			name="structure[<?php echo $k;?>][method][jsonvalue]"

			style="width: 100px;" value="<?php echo $v['jsonvalue'];?>" />默认: <input

			type="text" name="structure[<?php echo $k;?>][method][dvalue]"

			style="width: 50px;" value="<?php echo $v['method']['dvalue'];?>" />



<?php

	break;
	
case "dcheckbox":
?>

表名：<input type="text" name="structure[<?php echo $k;?>][method][table]" style="width: 100px;" value="<?php echo $v['method']['table'];?>" />&nbsp;&nbsp;条件：
		<input type="text" name="structure[<?php echo $k;?>][method][condition]" style="width: 100px;" value="<?php echo $v['method']['condition'];?>" />&nbsp;&nbsp;value:
		<input type="text" name="structure[<?php echo $k;?>][method][yvalue]" style="width: 30px;" value="<?php echo $v['method']['yvalue'];?>" />&nbsp;&nbsp;text：
		<input type="text" name="structure[<?php echo $k;?>][method][xvalue]" style="width: 30px;" value="<?php echo $v['method']['xvalue'];?>" />&nbsp;&nbsp;默认值：
		<input type="text" name="structure[<?php echo $k;?>][method][ydefault]" style="width: 30px;" value="<?php echo $v['method']['ydvalue'];?>" />&nbsp;&nbsp;

<?php
    break;

	case "select":

if($v['method']['table']!=''){



?>





表名：<input type="text" name="structure[<?php echo $k;?>][method][table]" style="width: 100px;" value="<?php echo $v['method']['table'];?>" />&nbsp;&nbsp;条件：
		<input type="text" name="structure[<?php echo $k;?>][method][condition]" style="width: 100px;" value="<?php echo $v['method']['condition'];?>" />&nbsp;&nbsp;value:
		<input type="text" name="structure[<?php echo $k;?>][method][yvalue]" style="width: 30px;" value="<?php echo $v['method']['yvalue'];?>" />&nbsp;&nbsp;text：
		<input type="text" name="structure[<?php echo $k;?>][method][xvalue]" style="width: 30px;" value="<?php echo $v['method']['xvalue'];?>" />&nbsp;&nbsp;默认值：
		<input type="text" name="structure[<?php echo $k;?>][method][ydefault]" style="width: 30px;" value="<?php echo $v['method']['ydvalue'];?>" />&nbsp;&nbsp;默认文字：
		<input type="text" name="structure[<?php echo $k;?>][method][xdefault]" style="width: 30px;" value="<?php echo $v['method']['xdvalue'];?>" />

<?php

	}else{

		$xy=array();
		$v['jsonvalue']='';
		foreach($v['method']['yvalue'] as $i=>$j){
		    if($v['jsonvalue']!=''){$v['jsonvalue'].="#";}
		    $v['jsonvalue'].=$j.'-'.$v['method']['xvalue'][$j];
			//$xy[]=$j."-".$v['method']['xvalue'][$i];
		}
		/*foreach($xy as $ii=>$jj){
			if($ii!=0){$v['jsonvalue'].="#";}
			$v['jsonvalue'].=$jj;
		}*/
?>

值对：<input type="text" name="structure[<?php echo $k;?>][method][jsonvalue]" style="width: 100px;" value="<?php echo $v['jsonvalue'];?>" />
默认: <input type="text" name="structure[<?php echo $k;?>][method][dvalue]" style="width: 50px;" value="<?php echo $v['method']['dvalue'];?>" />

<?php
}
?>
    <br />
    样式：<input type="text" name="structure[<?php echo $k;?>][css]" 	style="width: 100px;" value="<?php echo $v['css'];?>" />&nbsp;&nbsp;
    js:	<input type="text" name="structure[<?php echo $k;?>][js]" style="width: 100px;" value="<?php echo preg_replace('/\"/','`',$v['js']);?>" />&nbsp;&nbsp;
    fparam:	<input type="text" name="structure[<?php echo $k;?>][fparam]" style="width: 100px;" value="<?php echo $v['fparam'];?>" />&nbsp;&nbsp;
	<label	for="idstructure[<?php echo $k;?>][fxian]" />验证</label>
	<input	type="checkbox" name="structure[<?php echo $k;?>][fxian]" id="idstructure[<?php echo $k;?>][fxian]"	<?php if($v['fxian']!=''){echo "checked";}?> />

<?php 
	break;

	case "hide":
?>

	隐藏域

<?php

	break;

	case "ubb":

?>



<?php

	break;

	case "recommend":

?>

<div style="float:left;">推荐旗色: </div>
		<label><div style="float:left;width:30px;height:12px;background:green;"></div><input type="radio" <?php echo $v['flag']=='green'?'checked':'';?> name="structure[<?php echo $k;?>][flag]" value="green" style="float:left;"/></label>
		<label><div style="float:left;width:30px;height:12px;background:red;"></div><input type="radio" <?php echo $v['flag']=='red'?'checked':'';?> name="structure[<?php echo $k;?>][flag]" value="red" style="float:left;"/></label>
		<label><div style="float:left;width:30px;height:12px;background:blue;"></div><input type="radio" <?php echo $v['flag']=='blue'?'checked':'';?> name="structure[<?php echo $k;?>][flag]" value="blue"  style="float:left;"/></label>
		<label><div style="float:left;width:30px;height:12px;background:orange;"></div><input type="radio" <?php echo $v['flag']=='orange'?'checked':'';?> name="structure[<?php echo $k;?>][flag]" value="orange"  style="float:left;"/></label>
		<div style="float:left;margin-left:20px;">
			<label>是否排序:<input name="structure[<?php echo $k;?>][order][open]" <?php echo $v['order']['open']==1?'checked':'';?> type="checkbox" value="1" onclick="if(this.checked){document.getElementById('structure<?php echo $k;?>orderopen').style.display='';}else{document.getElementById('structure<?php echo $k;?>orderopen').style.display='none';}"/></label>
			<span id="structure<?php echo $k;?>orderopen" style="display:<?php echo $v['order']['open']==1?'':'none';?>;">
				<span style="padding:0 5px;">显示字段:<input name="structure[<?php echo $k;?>][order][field]" type="text" value="<?php echo $v['order']['field'];?>" style="width:60px;text-align:center;"/></span>
				<span style="padding:0 5px;">
					<select name="structure[<?php echo $k;?>][order][order]">
						<option <?php echo $v['order']['order']=='asc'?'selected':'';?> value="asc">升ASC</option>
						<option <?php echo $v['order']['order']=='desc'?'selected':'';?> value="desc">降DESC</option>
					</select>
				</span>
				<span style="padding:0 5px;">
					<label for="structure[<?php echo $k;?>][order][full_table_order]" title="全表数据排序[主要是针对附属里的排序有作用]">全表</label>
					<input id="structure[<?php echo $k;?>][order][full_table_order]" name="structure[<?php echo $k;?>][order][full_table_order]" <?php echo $v['order']['full_table_order']=='1'?'checked':'';?> type="checkbox" value="1"/>
				</span>
			</span>
		</div>

<?php

	break;

	case "textarea":

?>

fparam: <input type="text" name="structure[<?php echo $k;?>][fparam]"

			style="width: 100px;" value="<?php echo $v['fparam'];?>" />

<?php

	break;

	case "fileupBic":
	case "fileupFs":



	$format=$v['format'];

	$format=array_diff($format,array('jpg','gif','png','bmp'),array('rm',"mp3","wma"));

	$format=implode(",",$format);

?>

<label for="idstructure[<?php echo $k;?>][format][img]">图像</label><input

			type="checkbox" name="structure[<?php echo $k;?>][format][img]"

			id="idstructure[<?php echo $k;?>][format][img]"

			<?php if(in_array("gif",$v['format'])){echo "checked";}?> /><label

			for="ididstructure[<?php echo $k;?>][format][sound]">,声音</label><input

			type="checkbox" name="structure[<?php echo $k;?>][format][sound]"

			id="ididstructure[<?php echo $k;?>][format][sound]"

			<?php if(in_array("wma",$v['format'])){echo "checked";}?> /><label

			for="idstructure[<?php echo $k;?>][format][other]" />,其它:</label><input

			type="text" name="structure[<?php echo $k;?>][format][other]"

			id="ididstructure[<?php echo $k;?>][format][other]"

			value="<?php echo $format;?>" style="width: 100px;" />路径 :<input

			type="text" name="structure[<?php echo $k;?>][path]"

			value="<?php echo $v['path'];?>" style="width: 100px;" />大小(字节): <input

			type="text" name="structure[<?php echo $k;?>][filesize]"

			style="width: 60px;text-align:right;" value="<?php echo $v['filesize'];?>" />
			<label for="structure[<?php echo $k;?>][thumb_open]" title="只对图像有效">
				缩略图<input id="structure[<?php echo $k;?>][thumb_open]" type="checkbox" <?php echo $v['thumb_open']!=''?'checked':'';?> name="structure[<?php echo $k;?>][thumb_open]" value="1" onclick="document.getElementById('structure[<?php echo $k;?>][thumb_open][div]').style.display=this.checked?'':'none';"/>
			</label>
			<br />
			<div id="structure[<?php echo $k;?>][thumb_open][div]"  style="padding-top:3px;display:<?php echo $v['thumb_open']!=''?'':'none';?>;">
				<p>缩略图1&nbsp;&nbsp;&nbsp;
					<label>开启:<input name="structure[<?php echo $k;?>][thumb][1][thumb_open]" <?php echo $v['thumb'][1]['thumb_open']!=''?'checked':'';?> type="checkbox" value="1"/></label>&nbsp;&nbsp;&nbsp;
					宽:<input name="structure[<?php echo $k;?>][thumb][1][width]" style="width: 100px;" value="<?php echo $v['thumb'][1]['width'];?>"/>高:<input name="structure[<?php echo $k;?>][thumb][1][height]" style="width: 100px;" value="<?php echo $v['thumb'][1]['height'];?>"/>&nbsp;&nbsp;&nbsp;<b>调用方法:当前图像名字前加上<span style="color:red;">thumb1_</span> 如:thumb1_zh123.jpg</b>
				</p>
				<p>缩略图2&nbsp;&nbsp;&nbsp;
					<label>开启:<input name="structure[<?php echo $k;?>][thumb][2][thumb_open]" <?php echo $v['thumb'][2]['thumb_open']!=''?'checked':'';?> type="checkbox" value="1"/></label>&nbsp;&nbsp;&nbsp;
					宽:<input name="structure[<?php echo $k;?>][thumb][2][width]" style="width: 100px;" value="<?php echo $v['thumb'][2]['width'];?>"/>高:<input name="structure[<?php echo $k;?>][thumb][2][height]" style="width: 100px;" value="<?php echo $v['thumb'][2]['height'];?>"/>&nbsp;&nbsp;&nbsp;<b>调用方法:当前图像名字前加上<span style="color:red;">thumb2_</span> 如:thumb2_zh123.jpg</b>
				</p>
				<p>缩略图3&nbsp;&nbsp;&nbsp;
					<label>开启:<input name="structure[<?php echo $k;?>][thumb][3][thumb_open]" <?php echo $v['thumb'][3]['thumb_open']!=''?'checked':'';?> type="checkbox" value="1"/></label>&nbsp;&nbsp;&nbsp;
					宽:<input name="structure[<?php echo $k;?>][thumb][3][width]" style="width: 100px;" value="<?php echo $v['thumb'][3]['width'];?>"/>高:<input name="structure[<?php echo $k;?>][thumb][3][height]" style="width: 100px;" value="<?php echo $v['thumb'][3]['height'];?>"/>&nbsp;&nbsp;&nbsp;<b>调用方法:当前图像名字前加上<span style="color:red;">thumb3_</span> 如:thumb3_zh123.jpg</b>
				</p>
			</div>


<?php

	break;

	case "XUploadFiles":

?>

<label for="idstructure[<?php echo $k;?>][format][AllowExt]">允许上传类型</label>
<input type="text" name="structure[<?php echo $k;?>][format][AllowExt]" id="idstructure[<?php echo $k;?>][format][AllowExt]" value="<?php echo $v['format']['AllowExt'];?>" style="width:130px;"/>

<label for="ididstructure[<?php echo $k;?>][format][DenyExt]">,不允许上传类型</label>
<input type="text" name="structure[<?php echo $k;?>][format][DenyExt]" id="ididstructure[<?php echo $k;?>][format][DenyExt]" value="<?php echo $v['format']['DenyExt'];?>"  style="width:130px;"/>

<label for="idstructure[<?php echo $k;?>][MaxFileCount]" />,文件上传数:</label>
<input type="text" name="structure[<?php echo $k;?>][MaxFileCount]" id="ididstructure[<?php echo $k;?>][MaxFileCount]" value="<?php echo $v['MaxFileCount'];?>" style="width: 10px;" />
路径 :
<input type="text" name="structure[<?php echo $k;?>][path]" value="<?php echo $v['path'];?>" style="width: 130px;" />
大小(字节):
<input type="text" name="structure[<?php echo $k;?>][MaxTotalSize]" style="width: 60px;text-align:right;" value="<?php echo $v['MaxTotalSize'];?>" />
			<!-- <label for="structure[<?php echo $k;?>][thumb_open]" title="只对图像有效">
				缩略图<input id="structure[<?php echo $k;?>][thumb_open]" type="checkbox" <?php echo $v['thumb_open']!=''?'checked':'';?> name="structure[<?php echo $k;?>][thumb_open]" value="1" onclick="document.getElementById('structure[<?php echo $k;?>][thumb_open][div]').style.display=this.checked?'':'none';"/>
			</label>
			<br />
			<div id="structure[<?php echo $k;?>][thumb_open][div]"  style="padding-top:3px;display:<?php echo $v['thumb_open']!=''?'':'none';?>;">
				<p>缩略图1&nbsp;&nbsp;&nbsp;
					<label>开启:<input name="structure[<?php echo $k;?>][thumb][1][thumb_open]" <?php echo $v['thumb'][1]['thumb_open']!=''?'checked':'';?> type="checkbox" value="1"/></label>&nbsp;&nbsp;&nbsp;
					宽:<input name="structure[<?php echo $k;?>][thumb][1][width]" style="width: 100px;" value="<?php echo $v['thumb'][1]['width'];?>"/>高:<input name="structure[<?php echo $k;?>][thumb][1][height]" style="width: 100px;" value="<?php echo $v['thumb'][1]['height'];?>"/>&nbsp;&nbsp;&nbsp;<b>调用方法:当前图像名字前加上<span style="color:red;">thumb1_</span> 如:thumb1_zh123.jpg</b>
				</p>
				<p>缩略图2&nbsp;&nbsp;&nbsp;
					<label>开启:<input name="structure[<?php echo $k;?>][thumb][2][thumb_open]" <?php echo $v['thumb'][2]['thumb_open']!=''?'checked':'';?> type="checkbox" value="1"/></label>&nbsp;&nbsp;&nbsp;
					宽:<input name="structure[<?php echo $k;?>][thumb][2][width]" style="width: 100px;" value="<?php echo $v['thumb'][2]['width'];?>"/>高:<input name="structure[<?php echo $k;?>][thumb][2][height]" style="width: 100px;" value="<?php echo $v['thumb'][2]['height'];?>"/>&nbsp;&nbsp;&nbsp;<b>调用方法:当前图像名字前加上<span style="color:red;">thumb2_</span> 如:thumb2_zh123.jpg</b>
				</p>
				<p>缩略图3&nbsp;&nbsp;&nbsp;
					<label>开启:<input name="structure[<?php echo $k;?>][thumb][3][thumb_open]" <?php echo $v['thumb'][3]['thumb_open']!=''?'checked':'';?> type="checkbox" value="1"/></label>&nbsp;&nbsp;&nbsp;
					宽:<input name="structure[<?php echo $k;?>][thumb][3][width]" style="width: 100px;" value="<?php echo $v['thumb'][3]['width'];?>"/>高:<input name="structure[<?php echo $k;?>][thumb][3][height]" style="width: 100px;" value="<?php echo $v['thumb'][3]['height'];?>"/>&nbsp;&nbsp;&nbsp;<b>调用方法:当前图像名字前加上<span style="color:red;">thumb3_</span> 如:thumb3_zh123.jpg</b>
				</p>
			</div> -->


<?php

	break;

	case "bind":

?>

模块id<input type="text" name="structure[<?php echo $k;?>][did]" style="width: 100px;" value="<?php echo $v['did'];?>" />
		&nbsp;&nbsp;<b>过滤设置</b><span style="color:#bcbcbc;" title="此功能可以单独指定此附属功能只绑定一条数据!">说明</span>
		&nbsp;&nbsp;<label><input name="structure[<?php echo $k;?>][filter][open]" <?php echo $v['filter']['open']==1?'checked':'';?> type="checkbox" onclick="if(this.checked){document.getElementById('structure[<?php echo $k;?>][filter][spanId]').style.display='';}else{document.getElementById('structure[<?php echo $k;?>][filter][spanId]').style.display='none';}" value="1"/></label>
		<span id="structure[<?php echo $k;?>][filter][spanId]" style="display:<?php echo $v['filter']['open']==1?'':'none';?>;">&nbsp;&nbsp;指定数据字段<input type="text" name="structure[<?php echo $k;?>][filter][field]" style="width:30px;" value="gid" />
		&nbsp;&nbsp;<span title="多条数据用#连接">指定字段数据</span><input type="text" name="structure[<?php echo $k;?>][filter][data]" style="width:230px;" value="<?php echo $v['filter']['data'];?>" />
		</span>

<?php



	break;

case "md5str":

?>

	密码     验证:<input type="checkbox"

			<?php echo $v['yan']!=''?'checked':'';?>

			name="structure[<?php echo $k;?>][yan]" value="1"

			/>

<?php

	break;

case "my97":

?>

	My97日期时间插件

	| 您可以选择显示时间格式[<span style="color:red;">不可用中文</span>]

	<input name="structure[<?php echo $k;?>][format]" type="text" value="<?php echo $v['format']==''?"yyyy-M-d H:mm:ss":$v['format'];?>" style="width:150px;"/>

	| php格式化

	<input name="structure[<?php echo $k;?>][phpformat]" type="text" value="<?php echo $v['phpformat']==''?"Y-m-d H:i:s":$v['phpformat'];?>" style="width:150px;"/>

	<input type="hidden" name="structure[<?php echo $k;?>][plug]" value="d2t"

			/>

<?php

	break;

}



?></div></span>

		</td>

	</tr>

<?php

}

?>
<tr id="drag_location_id" style="display:none;"><td colspan="2" style="border:2px dashed yellow;height:30px;" >&nbsp;</td></tr>
</table>



</fieldset>

<input type="hidden" name="op" value="step2" /> <input type="submit"

	value="保存" /></form>

</body>

</html>

